package snafu.framework.states;

import java.util.List;
import java.util.Set;

import snafu.framework.senses.stimuli.Stimulus;
import snafu.framework.states.literals.StateLiteral;

public interface State {
	
	/**
	 * Get the value of a unique literal.
	 * 
	 * @param clazz
	 *            the class specifying the literal
	 * @return literal value, null if literal was not found
	 */
	public <T, L extends StateLiteral<T>> T getLiteral(Class<L> clazz);

	/**
	 * Get the value of a unique literal.
	 * 
	 * @param clazz
	 *            class specifying the literal
	 * @param defaultValue
	 *            value if literal not found
	 * @return literal value, defaultValue if literal not found
	 */
	public <T, L extends StateLiteral<T>> T getLiteral(Class<L> clazz, T defaultValue);

	/**
	 * Get all literals.
	 * 
	 * @return list of literals
	 */
	public List<StateLiteral<?>> getLiterals();

	/**
	 * Get all literals matching a given class.
	 * 
	 * @param clazz
	 *            class specifying the literals
	 * @return list of literals
	 */
	public <L extends StateLiteral<?>> List<L> getLiterals(Class<L> clazz);
	
	public Set<Stimulus> getStimuli();

}
